﻿<%@ Page Language="C#" MasterPageFile="~/InventoryTracker/MasterPage.master" AutoEventWireup="true" CodeFile="CustomerItem.aspx.cs" Inherits="InventoryTracker_CustomerItem" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="maincontent" Runat="Server">

<div id="projectreport">
        <a name="content_start0" id="content_start0"></a>
        <fieldset>
            <h2 class="none">
                Customer Item</h2>
            <legend>Customer Item</legend>
            <div class="formsection">
                Customer Item</div>
            
            <table style="height: 0px; width: 183px">
            <tr>
            <td>
            <asp:DropDownList ID="DdlCustIDSel" runat="server" AutoPostBack="True" 
                    DataSourceID="SqlDSCustIDSel" DataTextField="CustID" DataValueField="CustID" 
                    onselectedindexchanged="DdlCustIDSel_SelectedIndexChanged"></asp:DropDownList>
                <asp:SqlDataSource ID="SqlDSCustIDSel" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT [CustID] FROM [CustomerItem]"></asp:SqlDataSource>
            </td>
                <td>
                <p style="width: 175px; height: 44px">
                        
                        <asp:Label ID="lblCustID" runat="server" Text=" Customer ID"></asp:Label>
                        <br />
                        <asp:DropDownList ID="ddrCustID" runat="server" DataSourceID="CustIDSource1" 
                            DataTextField="CustName" DataValueField="CustID" Width="128px" ></asp:DropDownList>
                        
                        <asp:SqlDataSource ID="CustIDSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                            SelectCommand="SELECT [CustID], [CustName] FROM [CustomerMaster]"></asp:SqlDataSource>
                            
                            <asp:TextBox ID="txtCustIDsel" runat="server" Visible = "false" ></asp:TextBox>
                </p>
                
                              
                    <p style="width: 175px; height: 44px">
                        
                        <asp:Label ID="lblCustItemCode" runat="server" Text=" Item Code"></asp:Label>
                        
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtCustItemCode"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <asp:TextBox ID="txtCustItemCode" runat="server"></asp:TextBox>
                        <br />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtCustItemCode"
runat="server" ErrorMessage="Enter only Numbers." ValidationExpression="^[0-9]*$" 
                            SetFocusOnError="True"></asp:RegularExpressionValidator>
                        
                    </p>
                    
                    
                    <p style="width: 175px; height: 44px">
                        <asp:Label ID="lblCustConsumptionRate" runat="server" Text=" Consumption Rate"></asp:Label>
                        
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCustConsumptionRate"
                        ErrorMessage="*" ></asp:RequiredFieldValidator>
                        <asp:TextBox ID="txtCustConsumptionRate" runat="server"></asp:TextBox>
                        <br />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ControlToValidate="txtCustConsumptionRate"
runat="server" ErrorMessage="Enter only Numbers." ValidationExpression="^[0-9]*$" 
                            SetFocusOnError="True"></asp:RegularExpressionValidator>
                        
                    </p>
                    
            </td>
            
            </tr>
            </table>
            <asp:Label ID="lblWarn" runat="server" Text="* Required Fields" 
                ForeColor="Red"></asp:Label>
            <div class="formsection">
                <asp:Button ID="btnCustItemSubmit" runat="server"  Text="Submit" 
                    onclick="btnCustItemSubmit_Click"/>
                     <asp:Button ID="btnCustItemNew" runat="server"  Text="New" 
                    onclick="btnCustItemNew_Click"/>
                    <asp:Button ID="btnCustItemDelete" runat="server" Text="Delete" 
                    onclick="btnCustItemDelete_Click" ></asp:Button>
                    <asp:Button ID="btnCustItemEdit" runat="server" Text="Edit" 
                    onclick="btnCustItemEdit_Click" ></asp:Button>
                    <asp:Button ID="btnCustItemUpdate" runat="server" Text="Update" 
                    onclick="btnCustItemUpdate_Click" ></asp:Button>
                    
                <asp:Label ID="lblResult" runat="server" Text=""></asp:Label>
            </div>
        </fieldset>
    </div>
</asp:Content>

